#pragma once

/* disable HRTMon support by commenting this out */
#define ACTION_REPLAY_HRTMON

#ifdef ACTION_REPLAY
    #define ACTION_REPLAY_COMMON
#endif

#ifdef ACTION_REPLAY_HRTMON
    #define ACTION_REPLAY_COMMON
#endif

#ifdef ACTION_REPLAY
/* disable Action Replay ROM/RAM hide by commenting this out */
/* Better not disable this unless you do plenty of testing first. -Mark */
    #define ACTION_REPLAY_HIDE_CARTRIDGE
#endif

#define ACTION_REPLAY_WAIT_PC -3    /* Wait for a specified Program counter */
#define ACTION_REPLAY_INACTIVE -2
#define ACTION_REPLAY_WAITRESET -1
#define ACTION_REPLAY_IDLE 1
#define ACTION_REPLAY_ACTIVATE 2
#define ACTION_REPLAY_ACTIVE 3
#define ACTION_REPLAY_DORESET 4
#define ACTION_REPLAY_HIDE 5

extern int action_replay_freeze();

extern uae_ptr wait_for_pc;
extern int action_replay_flag;
extern int armodel;

extern int is_ar_pc_in_rom();
extern int is_ar_pc_in_ram();
extern void action_replay_enter();
extern void action_replay_ciaread();
extern void action_replay_hide();
extern void action_replay_reset();
extern int action_replay_load();

extern void action_replay_memory_reset();
extern void action_replay_init(int);
extern void action_replay_cleanup();
extern void action_replay_map_banks();
extern void REGPARAM3 chipmem_lput_actionreplay23(uae_ptr addr, uint l) REGPARAM;
extern void REGPARAM3 chipmem_wput_actionreplay23(uae_ptr addr, uint w) REGPARAM;
extern void REGPARAM3 chipmem_bput_actionreplay1(uae_ptr addr, uint b) REGPARAM;
extern void REGPARAM3 chipmem_wput_actionreplay1(uae_ptr addr, uint w) REGPARAM;
extern void REGPARAM3 chipmem_lput_actionreplay1(uae_ptr addr, uint l) REGPARAM;

extern void action_replay_version();

extern int hrtmon_flag;

extern void hrtmon_enter();
extern void hrtmon_breakenter();
extern void hrtmon_ciaread();
extern void hrtmon_hide();
extern void hrtmon_reset();
extern int hrtmon_load();
extern void hrtmon_map_banks();

/*extern byte *hrtmemory;*/
extern uint hrtmem_start, hrtmem_size;

extern byte ar_custom[2 * 256], ar_ciaa[16], ar_ciab[16];

extern int hrtmon_lang;